<template>
  <!-- 支付宝支付界面 -->
  <div style="text-align: center">
    <h1>支付页面</h1>
    <div v-html="payInfo.codeUrl" ref="pay"></div>
  </div>
</template>
<script>
import VueCookies from 'vue-cookies'
export default {
  components: {},
  props: [],
  data() {
    return {
      payInfo: {},
    };
  },
  created() {
    // let form = VueCookies.get("payFrom");
    // if (form!=null){
    //   this.$router.push({
    //     path: "/doPay",
    //   });
    //   return;
    // }
    this.$get("/pay/testAliPay", {}).then(res => {
      if (res.R) {
        VueCookies.set("payForm", res.data, "30min");
        setTimeout(()=>{
          this.$router.push({
            path: "/doPay",
          });
        },2000)
      }
    })

  },
  mounted() {
  },
  methods: {},
};
</script>
